import {
  // publicChartsStyles,
  groupList,
  axisList,
  successionList,
  pubLegend,
  pubDatasetComponentType,
  pubLinkageSettingType,
  pubPenetrationSettingsType
} from '../../constant';
import { cloneDeep } from 'lodash';
export const WidgetPie = {
  type: 'widget-pie',
  label: '基础饼图',
  icon: 'widget-pie',
  options: {
    setups: [
      {
        type: 'el-input',
        label: '组件名称',
        name: 'componentName',
        required: false,
        placeholder: '',
        value: '基础饼图'
      },
      cloneDeep(pubDatasetComponentType),
      {
        type: 'el-select',
        label: '横坐标',
        name: 'xAxis',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      {
        type: 'el-input',
        label: '图形值',
        name: 'yNum',
        readonly: true,
        placeholder: '',
        value: '1个'
      },
      {
        type: 'el-select',
        label: '主纵坐标',
        name: 'barChartValue',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      cloneDeep(pubLinkageSettingType),
      cloneDeep(pubPenetrationSettingsType)
    ],
    styles: {
      // ...cloneDeep(publicChartsStyles)
      groupList: [
        ...cloneDeep(groupList),
        {
          type: 'el-input-number',
          label: '起始百分比',
          name: 'startRadius',
          required: false,
          placeholder: '',
          value: 0
        },
        {
          type: 'el-input-number',
          label: '终止百分比',
          name: 'endRadius',
          required: false,
          placeholder: '',
          value: 70
        },
        {
          type: 'el-input-number',
          label: '横向百分比',
          name: 'xPosition',
          required: false,
          placeholder: '',
          value: 45
        },
        {
          type: 'el-input-number',
          label: '纵向百分比',
          name: 'yPosition',
          required: false,
          placeholder: '',
          value: 45
        }
      ],
      axisList: [...cloneDeep(axisList)],
      successionList: [...cloneDeep(successionList)],
      legendList: [...cloneDeep(pubLegend)]
    }
  }
};
